Skip to content

GD - backport fix for libpng warning when loading interlaced images #8002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

GD - backport fix for libpng warning when loading interlaced images #8002

wants to merge 1 commit into from

Conversation

brettwhiteman
Copy link
Contributor

Currently a warning is being generated when reading interlaced PNGs due to libpng being used incorrectly.

Refer to https://github.com/glennrp/libpng/blob/libpng16/pngread.c#L727 for the source of this warning.

This PR enables the interlacing transform prior to calling png_read_update_info() to prevent this warning. There is no change in functionality since libpng automatically does this after emitting the warning anyway.

@cmb69
Copy link
Member

cmb69 commented Feb 3, 2022

This would be an upstream issue, so please provide a PR there. After it has been fixed there, the patch can be backported to the bundled libgd.

@brettwhiteman
Copy link
Contributor Author

Submitted to libgd now libgd/libgd#823

Will you merge this PR once it has been applied to libgd, or will I need to submit a new PR at that point?

@cmb69
Copy link
Member

cmb69 commented Feb 4, 2022

We can merge this PR, or backport the libgd commit later; doesn't really matter. :)

@brettwhiteman brettwhiteman changed the title fix libpng warning with interlaced images GD - backport fix for libpng warning when loading interlaced images Feb 8, 2022
@brettwhiteman
Copy link
Contributor Author

@cmb69 The upstream PR has been merged and I've updated this PR to match 🙂

@cmb69 cmb69 closed this in 1d48da6 Feb 8, 2022
@cmb69
Copy link
Member

cmb69 commented Feb 8, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants